package com.cmdb.web.controller.system;

import java.io.OutputStream;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import com.cmdb.common.core.domain.entity.SysDept;
import com.cmdb.common.core.domain.entity.SysDictData;
import com.cmdb.common.utils.DictUtils;
import com.cmdb.common.utils.SecurityUtils;
import com.cmdb.system.mapper.SysAssetGxMapper;
import com.cmdb.system.service.ISysDeptService;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.cmdb.common.annotation.Log;
import com.cmdb.common.core.controller.BaseController;
import com.cmdb.common.core.domain.AjaxResult;
import com.cmdb.common.enums.BusinessType;
import com.cmdb.system.domain.SysAssetInfo;
import com.cmdb.system.domain.SysAssetGx;
import com.cmdb.system.service.ISysAssetInfoService;
import com.cmdb.common.utils.poi.ExcelUtil;
import com.cmdb.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
import java.net.URLEncoder;
import java.lang.reflect.Field;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.cmdb.common.annotation.Excel;
import org.apache.poi.ss.util.CellRangeAddressList;

import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;

/**
 * 资产信息Controller
 *
 * @author 陈玉强
 * @date 2025-06-01
 */
@RestController
@RequestMapping("/admin/asset")
public class SysAssetInfoController extends BaseController
{
    @Autowired
    private ISysAssetInfoService sysAssetInfoService;

    @Autowired
    public ISysDeptService deptService;

    @Autowired
    public SysAssetGxMapper assetGxMapper;
    /**
     * 获取资产统计数据
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:list')")
    @GetMapping("/statistics")
    public AjaxResult getStatistics() {
        try {
            SysAssetInfo sysAssetInfo = new SysAssetInfo();
            //获取当前用户ID
            Long userId = SecurityUtils.getUserId();
            if(!SecurityUtils.isAdmin(userId)){
                //赋值当前用户部门id
                sysAssetInfo.setCreateBy(SecurityUtils.getDeptId()+"");
            }
            return AjaxResult.success(sysAssetInfoService.getAssetStatistics(sysAssetInfo));
        } catch (Exception e) {
            return AjaxResult.error("获取统计数据失败：" + e.getMessage());
        }
    }
    /**
     * 查询资产信息列表
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysAssetInfo sysAssetInfo)
    {
        startPage();
        //获取当前用户ID
        Long userId = SecurityUtils.getUserId();
        if(!SecurityUtils.isAdmin(userId)){
            //赋值当前用户部门id
            sysAssetInfo.setCreateBy(SecurityUtils.getDeptId()+"");
        }
        List<SysAssetInfo> list = sysAssetInfoService.selectSysAssetInfoList(sysAssetInfo);
        return getDataTable(list);
    }

    /**
     * 导出资产信息列表
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:export')")
    @Log(title = "资产信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, SysAssetInfo sysAssetInfo, String assetIds) throws Exception {
        // 设置响应头
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf-8");
        String fileName = URLEncoder.encode("资产信息数据", "UTF-8").replaceAll("\\+", "%20");
        response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");

        // 创建日期格式化对象
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        // 获取数据
        List<SysAssetInfo> assetList;
        if (StringUtils.isNotEmpty(assetIds)) {
            // 如果有选中的资产ID，只导出选中的数据
            String[] ids = assetIds.split(",");
            Long[] assetIdArray = Arrays.stream(ids).map(Long::parseLong).toArray(Long[]::new);
            assetList = sysAssetInfoService.selectSysAssetInfoByAssetIds(assetIdArray);
        } else {
            // 否则导出所有数据
            assetList = sysAssetInfoService.selectSysAssetInfoList(sysAssetInfo);
        }

        List<SysAssetGx> gxList = new ArrayList<>();
        for (SysAssetInfo info : assetList) {
            SysAssetGx gx = new SysAssetGx();
            gx.setAssetId(info.getAssetId());
            List<SysAssetGx> sysAssetGxes = assetGxMapper.selectSysAssetGxList(gx);
            gxList.addAll(sysAssetGxes);
            // 转换字典值为中文标签
            getDictLable(info);


        }

        // 创建工作簿
        Workbook workbook = new XSSFWorkbook();

        // 创建资产信息sheet
        Sheet assetSheet = workbook.createSheet("资产信息");
        // 创建资产关联信息sheet
        Sheet gxSheet = workbook.createSheet("资产关联信息");

        // 获取资产信息字段
        Field[] assetFields = SysAssetInfo.class.getDeclaredFields();
        Row assetHeaderRow = assetSheet.createRow(0);
        int assetColIndex = 0;

        // 创建表头
        for (Field field : assetFields) {
            Excel excel = field.getAnnotation(Excel.class);
            if (excel != null) {
                Cell cell = assetHeaderRow.createCell(assetColIndex++);
                cell.setCellValue(excel.name());
            }
        }

        // 写入资产信息数据
        int assetRowIndex = 1;
        for (SysAssetInfo info : assetList) {
            Row row = assetSheet.createRow(assetRowIndex++);
            assetColIndex = 0;
            for (Field field : assetFields) {
                Excel excel = field.getAnnotation(Excel.class);
                if (excel != null) {
                    field.setAccessible(true);
                    try {
                        Object value = field.get(info);
                        Cell cell = row.createCell(assetColIndex++);
                        if (value != null) {
                            // 处理时间字段
                            if (value instanceof Date) {
                                cell.setCellValue(sdf.format((Date) value));
                            }
                            // 对于字典字段，使用转换后的值
                            else if (field.getName().equals("orgType") ||
                                field.getName().equals("infoType") ||
                                field.getName().equals("systemType") ||
                                field.getName().equals("isClassified") ||
                                field.getName().equals("systemLevel") ||
                                field.getName().equals("businessSecurityLevel") ||
                                field.getName().equals("serviceSecurityLevel") ||
                                field.getName().equals("isFiled") ||
                                field.getName().equals("isEvaluated") ||
                                field.getName().equals("osType") ||
                                field.getName().equals("middlewareType") ||
                                field.getName().equals("databaseType") ||
                                field.getName().equals("appProduct") ||
                                field.getName().equals("isSecurityEvaluated") ||
                                field.getName().equals("isCloudEvaluated") ||
                                field.getName().equals("status")) {
                                cell.setCellValue(value.toString());
                            } else {
                                cell.setCellValue(value.toString());
                            }
                        }
                    } catch (Exception e) {
                        logger.error("导出资产信息数据失败", e);
                    }
                }
            }
        }

        // 获取资产关联信息字段
        Field[] gxFields = SysAssetGx.class.getDeclaredFields();
        Row gxHeaderRow = gxSheet.createRow(0);
        int gxColIndex = 0;

        // 创建关联信息表头
        for (Field field : gxFields) {
            Excel excel = field.getAnnotation(Excel.class);
            if (excel != null) {
                Cell cell = gxHeaderRow.createCell(gxColIndex++);
                cell.setCellValue(excel.name());
            }
        }

        // 写入关联信息数据
        int gxRowIndex = 1;
        for (SysAssetGx gx : gxList) {
            Row row = gxSheet.createRow(gxRowIndex++);
            gxColIndex = 0;
            for (Field field : gxFields) {
                Excel excel = field.getAnnotation(Excel.class);
                if (excel != null) {
                    field.setAccessible(true);
                    try {
                        Object value = field.get(gx);
                        Cell cell = row.createCell(gxColIndex++);
                        if (value != null) {
                            // 处理时间字段
                            if (value instanceof Date) {
                                cell.setCellValue(sdf.format((Date) value));
                            }
                            // 对于isActive字段，转换为"是"/"否"
                            else if (field.getName().equals("isActive")) {
                                cell.setCellValue("1".equals(value.toString()) ? "是" : "否");
                            } else {
                                cell.setCellValue(value.toString());
                            }
                        }
                    } catch (Exception e) {
                        logger.error("导出资产关联信息数据失败", e);
                    }
                }
            }
        }

        // 写入响应流
        workbook.write(response.getOutputStream());
        workbook.close();
    }

    /**
     * 获取资产信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:query')")
    @GetMapping(value = "/{assetId}")
    public AjaxResult getInfo(@PathVariable("assetId") Long assetId)
    {
        return AjaxResult.success(sysAssetInfoService.selectSysAssetInfoByAssetId(assetId));
    }

    /**
     * 新增资产信息
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:add')")
    @Log(title = "资产信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody SysAssetInfo sysAssetInfo)
    {
        return toAjax(sysAssetInfoService.insertSysAssetInfo(sysAssetInfo));
    }

    /**
     * 修改资产信息
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:edit')")
    @Log(title = "资产信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody SysAssetInfo sysAssetInfo)
    {
        return toAjax(sysAssetInfoService.updateSysAssetInfo(sysAssetInfo));
    }

    /**
     * 删除资产信息
     */
    @PreAuthorize("@ss.hasPermi('admin:asset:remove')")
    @Log(title = "资产信息", businessType = BusinessType.DELETE)
	@DeleteMapping("/{assetIds}")
    public AjaxResult remove(@PathVariable Long[] assetIds)
    {
        return toAjax(sysAssetInfoService.deleteSysAssetInfoByAssetIds(assetIds));
    }

    /**
     * 下载资产信息导入模板
     */
    @GetMapping("/importTemplate")
    public void importTemplate(HttpServletResponse response) {
        try {
            // 设置响应头
            response.setContentType("application/vnd.ms-excel");
            response.setCharacterEncoding("utf-8");
            String fileName = URLEncoder.encode("资产信息导入模板", "UTF-8").replaceAll("\\+", "%20");
            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");

            Workbook workbook = new XSSFWorkbook();

            // 0. 创建导入注意sheet
            Sheet noticeSheet = workbook.createSheet("导入注意");
            String importNotice = "导入注意\n"
                    + "1、组织架构默认为当前登录账号的归属部门\n"
                    + "2、是否定级必填，为否时 系统级别 业务信息安全等级 系统服务安全等级 是否备案 备案编号 可不填写 否则必填\n"
                    + "3、是否已测评必填，为否时，最近测评时间 等级测评结论 可不填写，否则必填  \n"
                    + "4、是否已开展商用密码应用安全性评估必填、为否时 最近密评时间 可不填，否则必填\n"
                    + "5、系统中是否包含个人信息必填，为否时 信息类别 个人信息数量 可不填，否则必填\n"
                    + "6、*号字段 原则必填，满足上方要求部分可不填\n"
                    + "7、资产关联信息sheet页的  资产ID 要归属与 资产信息 sheet 页  属于其子类*\n"
                    + "8、不可修改sheet名称";
            Row noticeRow = noticeSheet.createRow(0);
            noticeRow.setHeightInPoints(120);
            Cell noticeCell = noticeRow.createCell(0);
            noticeCell.setCellValue(importNotice);
            // 动态获取资产信息字段数
            Field[] assetFields = com.cmdb.system.domain.SysAssetInfo.class.getDeclaredFields();
            int columnCount = 0;
            for (Field field : assetFields) {
                com.cmdb.common.annotation.Excel excel = field.getAnnotation(com.cmdb.common.annotation.Excel.class);
                if (excel != null) {
                    columnCount++;
                }
            }
            noticeSheet.addMergedRegion(new CellRangeAddress(0, 0, 0, columnCount - 1));
            CellStyle noticeStyle = workbook.createCellStyle();
            noticeStyle.setWrapText(true);
            noticeStyle.setAlignment(HorizontalAlignment.LEFT);
            noticeStyle.setVerticalAlignment(VerticalAlignment.TOP);
            Font noticeFont = workbook.createFont();
            noticeFont.setFontHeightInPoints((short)11);
            noticeStyle.setFont(noticeFont);
            noticeCell.setCellStyle(noticeStyle);

            // 1. 创建资产信息sheet
            Sheet assetSheet = workbook.createSheet("资产信息");
            // 创建资产关联信息sheet
            Sheet gxSheet = workbook.createSheet("资产关联信息");

            // 获取资产信息字段
//            Field[] assetFields = SysAssetInfo.class.getDeclaredFields();
            Row assetHeaderRow = assetSheet.createRow(0);
            int assetColIndex = 0;
            int assetColIndex2 = 0;


            List<SysDept> sysDepts = deptService.selectDeptListAll();
            String[] dept_typeArray = sysDepts.stream()
                    .map(SysDept::getDeptName)
                    .toArray(String[]::new);
            // 创建字典数据映射
            Map<String, String[]> dictMap = new HashMap<>();
            //组织架构
            dictMap.put("orgIdName", dept_typeArray);
            // 单位类型
            dictMap.put("orgType", getName("dept_type"));
            // 系统类型
            dictMap.put("systemType", getName("sys_type"));
            // 是否定级
            dictMap.put("isClassified", getName("sys_is_dj"));
            // 系统级别
            dictMap.put("systemLevel", getName("sys_level"));
            // 业务信息安全等级
            dictMap.put("businessSecurityLevel",getName("sys_sc_level"));
            // 系统服务安全等级
            dictMap.put("serviceSecurityLevel", getName("sys_fw_level"));
            // 备案编号
            dictMap.put("isFiled", getName("sys_is_ba"));
            // 是否已测评
            dictMap.put("isEvaluated", getName("sys_is_pc"));
            // 访问途径
             dictMap.put("accessMethod",  getName("sys_acc_type"));
            // 操作系统
            dictMap.put("osType", getName("sys_xt"));
            // 中间件
            dictMap.put("middlewareType", getName("sys_zjj"));
            // 数据库
            dictMap.put("databaseType", getName("sys_db"));
            //应用软件产品
            dictMap.put("appProduct", getName("sys_app"));
            //是否已开展商用密码应用安全性评估
            dictMap.put("isSecurityEvaluated", getName("sys_is_pwd"));
            //云服务安全评估
            dictMap.put("isCloudEvaluated", getName("sys_is_yun"));
            //信息类比
            dictMap.put("infoType", getName("sys_info_type"));
            dictMap.put("infoperson", getName("sys_info_person"));
            //部署位置
            String[] sysJfAddrs = getName("sys_jf_addr");
            List<String> sysJfAddrsList = new ArrayList<>();
            for (int i = 0; i < sysJfAddrs.length; i++) {
                if(i<18){
                sysJfAddrsList.add(sysJfAddrs[i]);
                }
            }

            dictMap.put("deployLocation",sysJfAddrsList.toArray(new String[0]) );


            // 创建表头并设置下拉列表
            for (Field field : assetFields) {
                Excel excel = field.getAnnotation(Excel.class);
                if (excel != null) {
                    Cell cell = assetHeaderRow.createCell(assetColIndex);
                    cell.setCellValue(excel.name());

                    // 为字典字段创建下拉列表
                    String fieldName = field.getName();
                    if (dictMap.containsKey(fieldName)) {
                        // 创建数据验证
                        DataValidationHelper dvHelper = assetSheet.getDataValidationHelper();
                        DataValidationConstraint dvConstraint = dvHelper.createExplicitListConstraint(dictMap.get(fieldName));
                        CellRangeAddressList addressList = new CellRangeAddressList(1, 1000, assetColIndex, assetColIndex);
                        DataValidation validation = dvHelper.createValidation(dvConstraint, addressList);
                        validation.setShowErrorBox(true);
                        validation.setEmptyCellAllowed(true);
                        assetSheet.addValidationData(validation);
                    }
                    assetColIndex++;
                }
            }

            // 获取资产关联信息字段  给访问途径增加下拉列表
            Field[] gxFields = SysAssetGx.class.getDeclaredFields();
            Row gxHeaderRow = gxSheet.createRow(0);
            int gxColIndex = 0;
            for (Field field : gxFields) {
                Excel excel = field.getAnnotation(Excel.class);
                if (excel != null) {
                    String fieldName = field.getName();
                    Cell cell = gxHeaderRow.createCell(gxColIndex);
                    cell.setCellValue(excel.name());
                    if (dictMap.containsKey(fieldName)) {
                        // 创建数据验证
                        DataValidationHelper dvHelper = gxSheet.getDataValidationHelper();
                        DataValidationConstraint dvConstraint = dvHelper.createExplicitListConstraint(dictMap.get(fieldName));
                        CellRangeAddressList addressList = new CellRangeAddressList(1, 1000, gxColIndex, gxColIndex);
                        DataValidation validation = dvHelper.createValidation(dvConstraint, addressList);
                        validation.setShowErrorBox(true);
                        validation.setEmptyCellAllowed(true);
                        gxSheet.addValidationData(validation);
                    }
                    gxColIndex++;
                }
            }

            // 写入响应流
            workbook.write(response.getOutputStream());
            workbook.close();
        } catch (Exception e) {
            logger.error("下载导入模板失败", e);
        }
    }

    /**
     * 导入资产信息数据
     */
    @Log(title = "资产信息", businessType = BusinessType.IMPORT)
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
        ExcelUtil<SysAssetInfo> util = new ExcelUtil<SysAssetInfo>(SysAssetInfo.class);
        List<SysAssetInfo> assetList = util.importExcel(file.getInputStream(),1);
        ExcelUtil<SysAssetGx> utils = new ExcelUtil<SysAssetGx>(SysAssetGx.class);
        List<SysAssetGx> gxlist = utils.importExcel(file.getInputStream(),2);
        for (SysAssetInfo info : assetList) {
           // info.setOrgIdName(DictUtils.getDictName("dept"+info.getOrgId()));
            getDictValue(info);
            for (SysAssetGx gx : gxlist) {

                if(info.getAssetId().equals(gx.getAssetId())){
                    //访问途径
                    gx.setAccessMethod(DictUtils.getDictValue("sys_acc_type", gx.getAccessMethod()));
                    info.getSysAssetGx().add(gx);
                }
            }

        }
        String message = sysAssetInfoService.importAsset(assetList, updateSupport);
        return AjaxResult.success(message);
    }

    public  String[] getName(String name){
        List<SysDictData> type = DictUtils.getDictCache(name);
        String[] dept_typeArray = type.stream()
                .map(SysDictData::getDictLabel)
                .toArray(String[]::new);
        return dept_typeArray;
    }

    public  void  getDictLable(SysAssetInfo info){
        //单位类型
        info.setOrgType(DictUtils.getDictLabel("dept_type", info.getOrgType()));
        //身份信息 sys_info_type
        info.setInfoType(DictUtils.getDictLabel("sys_info_type", info.getInfoType()));
        //组织架构名称

        info.setOrgId(Integer.parseInt(DictUtils.getDictName("dept"+info.getOrgIdName())));

        //系统类型 sys_type
        info.setSystemType(DictUtils.getDictLabel("sys_type", info.getSystemType()));
        //是否定级 sys_is_dj
        info.setIsClassified(DictUtils.getDictLabel("sys_is_dj", info.getIsClassified()));
        //系统级别 sys_level
        info.setSystemLevel(DictUtils.getDictLabel("sys_level", info.getSystemLevel()));
        //业务安全等级 sys_sc_level
        info.setBusinessSecurityLevel(DictUtils.getDictLabel("sys_sc_level", info.getBusinessSecurityLevel()));

        //系统服务安全等级 sys_fw_level
        info.setServiceSecurityLevel(DictUtils.getDictLabel("sys_fw_level", info.getServiceSecurityLevel()));

        //是否备案  sys_is_ba
        info.setIsFiled(DictUtils.getDictLabel("sys_is_ba", info.getIsFiled()));

        //是否评测  sys_is_pc
        info.setIsEvaluated(DictUtils.getDictLabel("sys_is_pc", info.getIsEvaluated()));


        //操作系统
        //sys_xt
        info.setOsType(DictUtils.getDictLabel("sys_xt", info.getOsType()));

        //中间件
        //sys_zjj
        info.setMiddlewareType(DictUtils.getDictLabel("sys_zjj", info.getMiddlewareType()));

        //数据库
        //sys_db
        info.setDatabaseType(DictUtils.getDictLabel("sys_db", info.getDatabaseType()));

        //应用软件产品
        //sys_app
        info.setAppProduct(DictUtils.getDictLabel("sys_app", info.getAppProduct()));

        //商用密码                    sys_is_pwd
        info.setIsSecurityEvaluated(DictUtils.getDictLabel("sys_is_pwd", info.getIsSecurityEvaluated()));

        //云计算服务
        //sys_is_yun
        info.setIsCloudEvaluated(DictUtils.getDictLabel("sys_is_yun", info.getIsCloudEvaluated()));

        //云计算服务
        //sys_status
        info.setInfoperson(DictUtils.getDictLabel("sys_info_person", info.getInfoperson()));

    }
    public  void  getDictValue(SysAssetInfo info){
        //单位类型
        info.setOrgType(DictUtils.getDictValue("dept_type", info.getOrgType()));
        //身份信息 sys_info_type
        info.setInfoType(DictUtils.getDictValue("sys_info_type", info.getInfoType()));
        //组织架构名称

//        info.setOrgId(Integer.parseInt(DictUtils.getDictName("dept"+info.getOrgIdName())));

        //系统类型 sys_type
        info.setSystemType(DictUtils.getDictValue("sys_type", info.getSystemType()));
        //是否定级 sys_is_dj
        info.setIsClassified(DictUtils.getDictValue("sys_is_dj", info.getIsClassified()));
        //系统级别 sys_level
        info.setSystemLevel(DictUtils.getDictValue("sys_level", info.getSystemLevel()));
        //业务安全等级 sys_sc_level
        info.setBusinessSecurityLevel(DictUtils.getDictValue("sys_sc_level", info.getBusinessSecurityLevel()));

        //系统服务安全等级 sys_fw_level
        info.setServiceSecurityLevel(DictUtils.getDictValue("sys_fw_level", info.getServiceSecurityLevel()));

        //是否备案  sys_is_ba
        info.setIsFiled(DictUtils.getDictValue("sys_is_ba", info.getIsFiled()));

        //是否评测  sys_is_pc
        info.setIsEvaluated(DictUtils.getDictValue("sys_is_pc", info.getIsEvaluated()));



        //操作系统
        //sys_xt
        info.setOsType(DictUtils.getDictValue("sys_xt", info.getOsType()));

        //中间件
        //sys_zjj
        info.setMiddlewareType(DictUtils.getDictValue("sys_zjj", info.getMiddlewareType()));

        //数据库
        //sys_db
        info.setDatabaseType(DictUtils.getDictValue("sys_db", info.getDatabaseType()));

        //应用软件产品
        //sys_app
        info.setAppProduct(DictUtils.getDictValue("sys_app", info.getAppProduct()));

        //商用密码                    sys_is_pwd
        info.setIsSecurityEvaluated(DictUtils.getDictValue("sys_is_pwd", info.getIsSecurityEvaluated()));

        //云计算服务
        //sys_is_yun
        info.setIsCloudEvaluated(DictUtils.getDictValue("sys_is_yun", info.getIsCloudEvaluated()));
        info.setInfoperson(DictUtils.getDictValue("sys_info_person", info.getInfoperson()));
        //云计算服务
        //sys_status
//        info.setStatus(DictUtils.getDictValue("sys_status", info.getStatus()));

    }


}
